package cn.edu.scau.cmi.chenyipeng.hibernate.client;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;

import org.hibernate.Session;
import org.hibernate.Transaction;

import cn.edu.scau.cmi.chenyipeng.hibernate.dao.StudentDAO;
import cn.edu.scau.cmi.chenyipeng.hibernate.dao.TeacherDAO;
import cn.edu.scau.cmi.chenyipeng.hibernate.domain.Student;
import cn.edu.scau.cmi.chenyipeng.hibernate.domain.Teacher;
import cn.edu.scau.cmi.chenyipeng.hibernate.tool.ScauCmiHibernateSessionFactoryUtil;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class HibernateClient extends Application{
	@Override
    public void start(Stage primaryStage) {
        try {
        	Parent root =FXMLLoader.load(getClass().getResource("/cn/edu/scau/cmi/chenyipeng/hibernate/tool/HibernateGUI.fxml"));
			Scene scene = new Scene(root);
			primaryStage.setScene(scene);
			primaryStage.setTitle("实验6");
			primaryStage.setResizable(false);
			primaryStage.show();
        } catch(Exception e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        launch(args);
    }

	
}
